package com.ruben.simpleboot.controller

import com.baomidou.mybatisplus.core.metadata.IPage
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.ruben.simpleboot.pojo.po.UserInfo
import io.github.vampireachao.stream.plugin.mybatisplus.Database
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("user")
class TestController {

    @GetMapping("page")
    fun test(page: Page<UserInfo>): IPage<UserInfo> {
        return Database.page(page, UserInfo::class.java)
    }
}